/*
 * @Description: 
 * @Author: gzc
 * @Date: 2024-03-21 15:27:05
 */
const { defineConfig } = require('@vue/cli-service')


function publicPath() {
    return "/";
}
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: publicPath(),
  devServer: {
    port: 7778, // 端口
    host: '0.0.0.0',
    hot: true,
    proxy: { // 请求代理服务器
      '/mall': { //带上api前缀的
        target: 'http://127.0.0.1:8082/mall', //代理目标地址
        // target: 'http://1.95.217.223:8082/mall', //代理目标地址
        changeOrigin: true,
        secure: false,
        pathRewrite: { // 在发出请求后将/api替换为''空值，这样不影响接口请求
          '^/mall': ''
        }
      }
    }
  },
})
